#include "TNode.h"

TNode::TNode(char type, int content, int line){
	TNode::type = type;
	TNode::content = content;
	TNode::line = line;
}

TNode::TNode(char type, int content, int line,TNode* parent,vector<TNode*> children,TNode* left,TNode* right){
	TNode::type = type;
	TNode::content = content;
	TNode::parent = parent;
	TNode::children = children;
	TNode::left = left;
	TNode::right = right;
	TNode::line = line;
}

void TNode::makeLeft(TNode* left){
	TNode::left = left;
}
void TNode::makeRight(TNode* right){
	TNode::right = right;
}
void TNode::makeChild(TNode* child){
	TNode::children.push_back(child);
}
TNode* TNode::getParent(TNode* child){
	return TNode::parent;
}
vector<TNode*> TNode::getChildren(TNode* parent){
return TNode::children;
}
TNode* TNode::getLeftSibling(TNode* node){
return TNode::left;
}
TNode* TNode::getRightSibling(TNode* node){
	return TNode::right;
}